# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-bincopy
pkgver=20.0.0
pkgrel=1
pkgdesc="Mangling of various file formats that conveys binary information (Motorola S-Record, Intel HEX and binary files)"
url="https://github.com/eerimoq/bincopy"
arch="noarch"
license="MIT"
depends="
	py3-argparse_addons
	py3-humanfriendly
	py3-elftools
	"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://pypi.python.org/packages/source/b/bincopy/bincopy-$pkgver.tar.gz"
builddir="$srcdir/bincopy-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
05cc54684c951ac209fa25ebdc2f60566ef93248cfa298439a2a4f6a4174e02f47476573aa580ae2d1e4b8e16e91ee8c4fee2097c375ca2c079dbbb0602b6153  bincopy-20.0.0.tar.gz
"
